<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>DefaultItemTouchCallback</title>
<link href="../../../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../";</script><script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async="async"></script><link href="../../../styles/style.css" rel="Stylesheet"><link href="../../../styles/logo-styles.css" rel="Stylesheet"><link href="../../../styles/jetbrains-mono.css" rel="Stylesheet"><link href="../../../styles/main.css" rel="Stylesheet"><script type="text/javascript" src="../../../scripts/clipboard.js" async="async"></script><script type="text/javascript" src="../../../scripts/navigation-loader.js" async="async"></script><script type="text/javascript" src="../../../scripts/platform-content-handler.js" async="async"></script><script type="text/javascript" src="../../../scripts/main.js" async="async"></script>  </head>
  <body>
    <div id="container">
      <div id="leftColumn"><a href="../../../index.html">
          <div id="logo"></div>
        </a>
        <div id="paneSearch"></div>
        <div id="sideMenu"></div>
      </div>
      <div id="main">
        <div id="leftToggler"><span class="icon-toggler"></span></div>
<script type="text/javascript" src="../../../scripts/main.js"></script>        <div class="main-content" id="content" pageIds="BRV::com.drake.brv.listener/DefaultItemTouchCallback///PointingToDeclaration//-900954490">
          <div class="navigation-wrapper" id="navigation-wrapper">
            <div class="breadcrumbs"><a href="../../../index.html">BRV</a>/<a href="../index.html">com.drake.brv.listener</a>/<a href="index.html">DefaultItemTouchCallback</a></div>
            <div class="pull-right d-flex">
              <div id="searchBar"></div>
            </div>
          </div>
          <div class="cover ">
            <h1 class="cover"><span>Default</span><wbr></wbr><span>Item</span><wbr></wbr><span>Touch</span><wbr></wbr><span>Callback</span></h1>
            <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">open class <a href="index.html">DefaultItemTouchCallback</a> : <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/ItemTouchHelper.Callback.html">ItemTouchHelper.Callback</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">默认实现拖拽替换和侧滑删除</p></div></div>
          </div>
          <div class="tabbedcontent">
            <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="Constructors">Constructors</button><button class="section-tab" data-togglable="Functions">Functions</button></div>
            <div class="tabs-section-body">
              <h2 class="tabbedcontent">Constructors</h2>
              <div class="table" data-togglable="Constructors"><a data-name="918101363%2FConstructors%2F-900954490" anchor-label="DefaultItemTouchCallback" id="918101363%2FConstructors%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release">
                  <div class="main-subrow keyValue TabbedContent">
                    <div class=""><span class="inline-flex"><a href="-default-item-touch-callback.html">DefaultItemTouchCallback</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="918101363%2FConstructors%2F-900954490"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title">
                        <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">fun <a href="-default-item-touch-callback.html">DefaultItemTouchCallback</a>()<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <h2 class="">Functions</h2>
              <div class="table" data-togglable="Functions"><a data-name="-849900811%2FFunctions%2F-900954490" anchor-label="clearView" id="-849900811%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="clear-view.html">clearView</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-849900811%2FFunctions%2F-900954490"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">open override fun <a href="clear-view.html">clearView</a>(recyclerView: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.html">RecyclerView</a>, viewHolder: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder.html">RecyclerView.ViewHolder</a>)<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
</div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="2125125681%2FFunctions%2F-900954490" anchor-label="getMovementFlags" id="2125125681%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="get-movement-flags.html">getMovementFlags</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="2125125681%2FFunctions%2F-900954490"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">open override fun <a href="get-movement-flags.html">getMovementFlags</a>(recyclerView: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.html">RecyclerView</a>, viewHolder: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder.html">RecyclerView.ViewHolder</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="2125125681%2FFunctions%2F-900954490" anchor-label="getMovementFlags" id="2125125681%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a><div class="brief "><a data-name="2125125681%2FFunctions%2F-900954490" anchor-label="getMovementFlags" id="2125125681%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>返回值表示拖拽/侧滑的方向</div></div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="1133193722%2FFunctions%2F-900954490" anchor-label="getSwipeThreshold" id="1133193722%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="get-swipe-threshold.html">getSwipeThreshold</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1133193722%2FFunctions%2F-900954490"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">open override fun <a href="get-swipe-threshold.html">getSwipeThreshold</a>(viewHolder: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder.html">RecyclerView.ViewHolder</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="1133193722%2FFunctions%2F-900954490" anchor-label="getSwipeThreshold" id="1133193722%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a><div class="brief "><a data-name="1133193722%2FFunctions%2F-900954490" anchor-label="getSwipeThreshold" id="1133193722%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>滑动距离速率来判断当前是否执行滑动删除事件(可以理解为移出itemView)</div></div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="851117638%2FFunctions%2F-900954490" anchor-label="onChildDraw" id="851117638%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="on-child-draw.html">onChildDraw</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="851117638%2FFunctions%2F-900954490"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">open override fun <a href="on-child-draw.html">onChildDraw</a>(c: <a href="https://developer.android.com/reference/kotlin/android/graphics/Canvas.html">Canvas</a>, recyclerView: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.html">RecyclerView</a>, viewHolder: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder.html">RecyclerView.ViewHolder</a>, dX: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>, dY: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>, actionState: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>, isCurrentlyActive: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>)<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="851117638%2FFunctions%2F-900954490" anchor-label="onChildDraw" id="851117638%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a><div class="brief "><a data-name="851117638%2FFunctions%2F-900954490" anchor-label="onChildDraw" id="851117638%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>绘制拖拽或者侧滑动画</div></div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="1820199535%2FFunctions%2F-900954490" anchor-label="onDrag" id="1820199535%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="on-drag.html">onDrag</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1820199535%2FFunctions%2F-900954490"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">open fun <a href="on-drag.html">onDrag</a>(source: <a href="../../com.drake.brv/-binding-adapter/-binding-view-holder/index.html">BindingAdapter.BindingViewHolder</a>, target: <a href="../../com.drake.brv/-binding-adapter/-binding-view-holder/index.html">BindingAdapter.BindingViewHolder</a>)<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="1820199535%2FFunctions%2F-900954490" anchor-label="onDrag" id="1820199535%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a><div class="brief "><a data-name="1820199535%2FFunctions%2F-900954490" anchor-label="onDrag" id="1820199535%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>当拖拽动作完成且松开手指时触发</div></div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="1849611430%2FFunctions%2F-900954490" anchor-label="onMove" id="1849611430%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="on-move.html">onMove</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1849611430%2FFunctions%2F-900954490"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">open override fun <a href="on-move.html">onMove</a>(recyclerView: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.html">RecyclerView</a>, source: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder.html">RecyclerView.ViewHolder</a>, target: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder.html">RecyclerView.ViewHolder</a>): <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="1849611430%2FFunctions%2F-900954490" anchor-label="onMove" id="1849611430%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a><div class="brief "><a data-name="1849611430%2FFunctions%2F-900954490" anchor-label="onMove" id="1849611430%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>拖拽移动超过其他item时, 其返回值表示是否已经拖拽替换(会触发函数onMoved)</div></div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="1320463489%2FFunctions%2F-900954490" anchor-label="onSelectedChanged" id="1320463489%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="on-selected-changed.html">onSelectedChanged</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1320463489%2FFunctions%2F-900954490"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">open override fun <a href="on-selected-changed.html">onSelectedChanged</a>(viewHolder: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder.html">RecyclerView.ViewHolder</a>?, actionState: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="1320463489%2FFunctions%2F-900954490" anchor-label="onSelectedChanged" id="1320463489%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a><div class="brief "><a data-name="1320463489%2FFunctions%2F-900954490" anchor-label="onSelectedChanged" id="1320463489%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>拖拽或者侧滑导致的状态变化</div></div>
</div>
                    </div>
                  </div>
                </div>
<a data-name="866118265%2FFunctions%2F-900954490" anchor-label="onSwiped" id="866118265%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="on-swiped.html">onSwiped</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="866118265%2FFunctions%2F-900954490"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":brv:dokkaHtml/release" data-filterable-set=":brv:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":brv:dokkaHtml/release"><div class="symbol monospace">open override fun <a href="on-swiped.html">onSwiped</a>(viewHolder: <a href="https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.ViewHolder.html">RecyclerView.ViewHolder</a>, direction: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
<a data-name="866118265%2FFunctions%2F-900954490" anchor-label="onSwiped" id="866118265%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a><div class="brief "><a data-name="866118265%2FFunctions%2F-900954490" anchor-label="onSwiped" id="866118265%2FFunctions%2F-900954490" data-filterable-set=":brv:dokkaHtml/release"></a>侧滑到底item消失时</div></div>
</div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="footer"><span class="go-to-top-icon"><a href="#content"></a></span><span>© 2023 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span></div>
      </div>
    </div>
  </body>
</html>

